package com.huizu.common.enums;

import cn.hutool.core.util.StrUtil;

public enum LaborEnum {
    BASIC_LABOR(1, "基础劳动"),
    SOCIAL_PUBLIC_WELFARE(2, "社会公益劳动"),
    LABOR_OUTCOME(3, "劳动成果"),
    LABOR_SUMMARY_REPORT(4, "劳动总结报告");

    private String typeName;

    private int value;


    public String getTypeName() {
        return typeName;
    }

    public int getValue() {
        return value;
    }

    LaborEnum(int value, String typeName) {
        this.value = value;
        this.typeName = typeName;
    }


    public static LaborEnum getByValue(String typeName) {
        if (StrUtil.isBlank(typeName)) {
            return null;
        }
        for (LaborEnum type : LaborEnum.values()) {
            if (type.getTypeName().equals(typeName)) {
                return type;
            }
        }
        return null;
    }
}
